<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<@mits.showContentType />
<title></title>
<meta http-equiv='expires' content='0'>
<meta http-equiv='cache-control' content='no-cache'>
<meta http-equiv='pragma' content='no-cache'>
<link rel="stylesheet" type="text/css" href="${base}/${brandingStaticLocation}css/zh_cn/index.css" />
<link rel="STYLESHEET" type="text/css" href="${base}/${brandingStaticLocation}codebase/dhtmlxtree.css">
<script  src="${base}/${brandingStaticLocation}codebase/dhtmlxcommon.js"></script>
<script  src="${base}/${brandingStaticLocation}codebase/dhtmlxtree.js"></script>
<@mits.showResourceScript "prototype-1.6.0.2.js" />
<script>
function doLogout(){ 
 window.parent.location ="${base}/common/doLogout.action";
}
//alert(window.parent.document.body.clientHeight);

</script>
</head>
<body offsetTop="0">
<div class="ScreenArrow" id="ScreenArrow">
	<div class="btn_all" onclick="switchScreen(0)" id="btn_all"></div>
	<div class="btn_h_01" onclick="switchScreen(1)" id="btn_h"></div>
	<div class="btn_v_01" onclick="switchScreen(2)" id="btn_v"></div>
	<div class="blank"></div>
</div>
<div class="Main_left" id="leftSide">
		<div class = "Main_left_menu" id="Main_left">
			
			<div class="Main_left_menu_bottom" id="menuBottom">
			<DIV  valign="bottom">&nbsp;&nbsp;&nbsp;&nbsp;<#if Session["session.key.user"]?exists><#assign user = Session["session.key.user"]?if_exists/>
			<font color="red">您好：${user.userName?if_exists}</font></#if>&nbsp;&nbsp;&nbsp;&nbsp;<A href="javascript:onClick=doLogout()">注销</A></DIV>
			<div style="height:20"></div>
			<#if Session["menuType"]?exists>
				<#assign menuType = Session["menuType"]?if_exists/>
				<#if menuType == 1>
				<!--系统设置	-->

				<div id="treeboxbox_tree" style="width:200px; height:500px;border :1px solid Silver;; overflow:auto;"></div>
				<br> 
				 			<script>	
				 			var clientWidth = window.parent.document.body.clientWidth;
							$('treeboxbox_tree').style.height = window.parent.document.body.clientHeight -100;
				 		 	function tonclick(id){
							 var url = tree.getUserData(id,'url');										
							  if(url !="") {
							    if(url.indexOf("?")>0) {
							 		url = url + "&clientWidth="+clientWidth;	
							 	} else 	url = url + "?clientWidth="+clientWidth;	   
								window.parent.mainFrame.frameElement.src=url;

							  }
							}
							tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
							tree.setSkin('dhx_skyblue');
							tree.setImagePath("${base}/${brandingStaticLocation}codebase/imgs/csh_bluefolders/");
							tree.setOnClickHandler(tonclick);
							tree.loadXML("${base}/template/system_tree.xml");
							
							</script>					
				<#elseif menuType == 2>
 				<div id="treeboxbox_tree" style="width:200px; height:500px;border :1px solid Silver;; overflow:auto;"></div>
				<br> 
				 			<script>	
				 			$('treeboxbox_tree').style.height = window.parent.document.body.clientHeight -100;
							function tonclick(id){
								var passPortName ='';
								var direction = '';
								var parentId;
							 	var url = tree.getUserData(id,'url');									
							  	if(url !="") {
							
							  	parentId = tree.getParentId(id);
							   	if( parentId <= 0) {
							   		passPortName = tree.getItemText(id);	 
							   } else {
							 	 passPortName = tree.getItemText(parentId);
							 	 direction = 	tree.getItemText(id);
							 	} 	
							 	var clientHeight = window.parent.document.body.clientHeight;
							 	//alert("[direction]"+direction);	
							 	url = url + "?clientHeight="+clientHeight+"&direction="+encodeURIComponent(direction)+"&passPortName="+encodeURIComponent(passPortName)
							 	//alert("[url]"+url);  
								window.parent.mainFrame.frameElement.src=url;
								

							  }
							}
							tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", -1);
							tree.setSkin('dhx_skyblue');
							tree.setOnClickHandler(tonclick);
							tree.setImagePath("${base}/${brandingStaticLocation}codebase/imgs/csh_bluebooks/");
							tree.setXMLAutoLoading("${base}/treeData");
							tree.loadXML("${base}/treeData");
							</script>
				</script>					
				<#elseif menuType == 3>
 				<div id="treeboxbox_tree" style="width:200px; height:500px;border :1px solid Silver;; overflow:auto;"></div>
				<br> 
				 			<script>	
				 			$('treeboxbox_tree').style.height = window.parent.document.body.clientHeight -100;
				 		 	function tonclick(id){
							 var url = tree.getUserData(id,'url');										
							  if(url !="") {	
							 				   
								window.parent.mainFrame.frameElement.src=url;

							  }
							}
							tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
							tree.setSkin('dhx_skyblue');
							tree.setImagePath("${base}/${brandingStaticLocation}codebase/imgs/csh_bluefolders/");
							tree.setOnClickHandler(tonclick);
							tree.loadXML("${base}/template/surveillance_tree.xml");
							
							</script>	
				</#if>				
			</#if>	

			</div>
		
		</div>
	</div>
</body>
</html>